<?php
/**
 * +--------------------------------------------------------+
 * @Created by PhpStorm.
 * @Category Admin.php
 * @Depiction:
 * Author: hwy
 * Date: 2020/5/28  16:52
 * +--------------------------------------------------------+
 */

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;  // use

class Admin extends Authenticatable
{
    use HasRoles;

    protected $table = 'admins';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [ 'name', 'password' ];

    /**
     * guard_name与HasRole配合使用,指定权限默认guard_name
     *
     * @var string
     */
    protected $guard_name = 'admin';


}
